package com.example.ponycui_home.svgaplayer;

import com.opensource.svgaplayer.SVGAImageView;
import ohos.aafwk.ability.Ability;
import ohos.aafwk.content.Intent;
import ohos.agp.utils.Color;
import ohos.agp.window.service.WindowManager;

/**
 * ex.
 *
 * @author wl
 * @since 2021-06-22
 */
public class AnimationFromLayoutAbility extends Ability {
    SVGAImageView animationView = null;

    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        setUIContent(ResourceTable.Layout_ability_simple);
        WindowManager.getInstance().getTopWindow().get().setStatusBarColor(Color.getIntColor("#FF000000"));
        animationView = (SVGAImageView) findComponentById(ResourceTable.Id_svgaImg);
    }

    @Override
    protected void onStop() {
        super.onStop();
        animationView.stopAnimation(true);
    }
}
